import request from './request.js';
export function getdict(data) {
	return request({
		url: `/system/dict/data/type/${data}`,
		method: 'get',
	})
}
//地址列表
export function addressList(data) {
	return request({
		url: '/customer/user/address/list',
		method: 'POST',
		data
	})
}
//添加地址
export function addressAdd(data) {
	return request({
		url: '/customer/user/address/add',
		method: 'POST',
		data
	})
}
//删除地址：
export function addressRemove(data) {
	return request({
		url: '/customer/user/address/remove',
		method: 'POST',
		data
	})
}

//搜索：
export function searchShop(data) {
	return request({
		url: '/customer/shop/search',
		method: 'POST',
		data
	})
}

//轮播图：
export function getbanner(data) {
	return request({
		url: '/customer/banner/all',
		method: 'POST',
		data
	})
}
//店铺分类：
export function getcategoryList(data) {
	return request({
		url: '/customer/product/category/list',
		method: 'POST',
		data
	})
}
//新店店铺
export function getnewsShop(data) {
	return request({
		url: '/customer/shop/news',
		method: 'POST',
		data
	})
}
//店铺
export function gethotsShop(data) {
	return request({
		url: '/customer/shop/hots',
		method: 'POST',
		data
	})
}
//店铺详情：
export function shopInfo(data) {
	return request({
		url: '/customer/shop/info',
		method: 'POST',
		data
	})
}
//商品详情：
export function productInfo(data) {
	return request({
		url: '/customer/product/info',
		method: 'POST',
		data
	})
}

//评论标签：// {shopId，productId}
export function commentTag(data) {
	return request({
		url: '/customer/comment/tag/list',
		method: 'POST',
		data
	})
}
//评论列表： // {shopId，productId，tag，img，order}
export function commentList(data) {
	return request({
		url: '/customer/comment/list',
		method: 'POST',
		data
	})
}
//附近商家： // {shopId，productId，tag，img，order}
export function shopvicinityList(data) {
	return request({
		url: '/customer/shop/vicinity',
		method: 'POST',
		data
	})
}

//授权登录
export function oauthLogin(data) {
	return request({
		url: '/customer/login/oauth',
		method: 'POST',
		data
	})
}
//验证码登录
export function codeLogin(data) {
	return request({
		url: '/customer/login/phone',
		method: 'POST',
		data
	})
}
//验证码登录
export function getCode(data) {
	return request({
		url: '/sms/phone',
		method: 'POST',
		data
	})
}

//个人信息
export function getUserInfo(data) {
	return request({
		url: '/customer/user/info',
		method: 'POST',
		data
	})
}
//修改信息
export function UserInfoUpdate(data) {
	return request({
		url: '/customer/user/update/info',
		method: 'POST',
		data
	})
}
//个人资料
export function getExtend(data) {
	return request({
		url: '/customer/user/extend',
		method: 'POST',
		data
	})
}
//修改资料
export function ExtendUpdate(data) {
	return request({
		url: '/customer/user/update/extend',
		method: 'POST',
		data
	})
}
// 我的页面 未查看的消息数量：
export function customerMsg(data) {
	return request({
		url: '/customer/msg/count/no/see',
		method: 'POST',
		data
	})
}
//官方消息
export function messageList(data) {
	return request({
		url: '/customer/sys/message/list',
		method: 'POST',
		data
	})
}


// 我的页面展示
export function customerData(data) {
	return request({
		url: '/customer/user/data',
		method: 'POST',
		data
	})
}

// 我的评论点赞
export function customerMsgreply(data) {
	return request({
		url: '/customer/msg/list/reply/like',
		method: 'POST',
		data
	})
}
// 收到的消息 评论点赞
export function customerMsgList(data) {
	return request({
		url: '/customer/msg/list',
		method: 'POST',
		data
	})
}

//消费劵
//领卷中心消费劵列表 
export function couponList(data) {
	return request({
		url: '/customer/coupon/list',
		method: 'POST',
		data
	})
}
//领卷中心 领取消费劵
export function couponTake(data) {
	return request({
		url: '/customer/coupon/take',
		method: 'POST',
		data
	})
}
//下单消费劵
export function couponorderYes(data) {
	return request({
		url: '/customer/coupon/order/yes',
		method: 'POST',
		data
	})
}
export function couponorderNo(data) {
	return request({
		url: '/customer/coupon/order/no',
		method: 'POST',
		data
	})
}
export function cardorderYes(data) {
	return request({
		url: '/customer/prepay/card/order/yes',
		method: 'POST',
		data
	})
}


//消费劵 可使用
export function couponYes(data) {
	return request({
		url: '/customer/coupon/self/yes',
		method: 'POST',
		data
	})
}
//消费劵 不可使用
export function couponNo(data) {
	return request({
		url: '/customer/coupon/self/no',
		method: 'POST',
		data
	})
}
//兑换消费卷：
export function couponReplace(data) {
	return request({
		url: '/customer/coupon/replace',
		method: 'POST',
		data
	})
}
//礼品卡 可使用
export function cardYes(data) {
	return request({
		url: '/customer/prepay/card/self/yes',
		method: 'POST',
		data
	})
}
//礼品卡 不可使用
export function cardNo(data) {
	return request({
		url: '/customer/prepay/card/self/no',
		method: 'POST',
		data
	})
}
//兑换礼品卡：
export function cardReplace(data) {
	return request({
		url: '/customer/prepay/card/bind',
		method: 'POST',
		data
	})
}
//礼品卡使用记录
export function cardHistoryList(data) {
	return request({
		url: '/customer/prepay/card/history/list',
		method: 'POST',
		data
	})
}
// 创建订单
export function createOrderApi(data) {
	return request({
		url: '/customer/orders/add',
		method: 'POST',
		data
	})
}
//继续支付详情
export function payOrderInfo(data) {
	return request({
		url: '/customer/orders/wait/pay/info',
		method: 'POST',
		data
	})
}
//继续支付
export function payOrderApi(data) {
	return request({
		url: '/customer/orders/continue/pay',
		method: 'POST',
		data
	})
}
//订单列表
export function ordersList(data) {
	return request({
		url: '/customer/orders/list',
		method: 'POST',
		data
	})
}
//订单详情
export function ordersInfo(data) {
	return request({
		url: '/customer/orders/info',
		method: 'POST',
		data
	})
}
//申请退款
export function ordersRefund(data) {
	return request({
		url: '/customer/orders/refund',
		method: 'POST',
		data
	})
}

//首页 待取餐
export function ordersWaittake(data) {
	return request({
		url: '/customer/orders/wait/take',
		method: 'POST',
		data
	})
}
//首页 确认取餐
export function orderstake(data) {
	return request({
		url: '/customer/orders/take',
		method: 'POST',
		data
	})
}

//评价
export function commentOrder(data) {
	return request({
		url: '/customer/comment/add',
		method: 'POST',
		data
	})
}
//评价列表
export function commentOrderList(data) {
	return request({
		url: '/customer/comment/list',
		method: 'POST',
		data
	})
}
// 商品评价标签
export function commenttag(data) {
	return request({
		url: '/customer/comment/tag/list',
		method: 'POST',
		data
	})
}
// 评论详情
export function commentInfo(data) {
	return request({
		url: '/customer/comment/info',
		method: 'POST',
		data
	})
}
// 回复列表
export function commentReplyList(data) {
	return request({
		url: '/customer/comment/reply/list',
		method: 'POST',
		data
	})
}

// 增加回复
export function commentReplyadd(data) {
	return request({
		url: '/customer/comment/reply/add',
		method: 'POST',
		data
	})
}
// 评论点赞：
export function commentLike(data) {
	return request({
		url: '/customer/comment/like',
		method: 'POST',
		data
	})
}

// 公众号、客服 二维码图片：
export function getimg(data) {
	return request({
		url: '/sys/info/query',
		method: 'POST',
		data
	})
}
// 意见反馈
export function feedAdd(data) {
	return request({
		url: '/customer/feed/back/add',
		method: 'POST',
		data
	})
}
// 常见问题
export function questionList(data) {
	return request({
		url: '/sys/question/list',
		method: 'POST',
		data
	})
}
//协议相关
export function queryAgreement(data) {
	return request({
		url: `/sys/text/query/${data}`,
		method: 'get',
	})
}
//消费卷领取记录  带有分页
export function inviteList(data) {
	return request({
		url: '/customer/user/invite/receive/list',
		method: 'POST',
		data
	})
}
//邀请1人、2人、3人 对应的消费卷
export function inviteQuery(data) {
	return request({
		url: '/customer/user/invite/query/coupon',
		method: 'POST',
		data
	})
}
//邀请
export function inviteQueryYq(data) {
	return request({
		url: '/customer/user/invite/query/invite',
		method: 'POST',
		data
	})
}
//查询新人注册消费卷：
export function inviteRegister(data) {
	return request({
		url: '/customer/user/invite/register/coupon',
		method: 'POST',
		data
	})
}
//邀请记录
export function yqList(data) {
	return request({
		url: '/customer/user/invite/invite/list',
		method: 'POST',
		data
	})
}
//助力记录
export function zlList(data) {
	return request({
		url: '/customer/user/invite/query/receive',
		method: 'POST',
		data
	})
}
// 检测是否领取过注册赠送的消费卷
export function userCheckReceive(data) {
	return request({
		url: '/customer/user/invite/check/register/receive',
		method: 'POST',
		data
	})
}
//订阅商品
export function postSubscribe(data) {
	return request({
		url: '/customer/user/push/subscribe',
		method: 'POST',
		data
	})
}
//订阅列表
export function subscribeList(data) {
	return request({
		url: '/customer/shop/subscribe/list',
		method: 'POST',
		data
	})
}

//区域代理检测
export function userAgent(data) {
	return request({
		url: '/customer/user/agent/info',
		method: 'POST',
		data
	})
}
//区域代理入住
export function userApply(data) {
	return request({
		url: '/customer/user/agent/apply',
		method: 'POST',
		data
	})
}
//代理生成小程序码:
export function userQr(data) {
	return request({
		url: '/customer/user/agent/qr',
		method: 'POST',
		data
	})
}

//代理；列表
export function userList(data) {
	return request({
		url: '/customer/user/agent/shop/list',
		method: 'POST',
		data
	})
}
//申请提现：
export function drawApply(data) {
	return request({
		url: '/customer/user/draw/apply',
		method: 'POST',
		data
	})
}
//提现记录：
export function drawList(data) {
	return request({
		url: '/customer/user/draw/list',
		method: 'POST',
		data
	})
}
//用户取消订单：
export function orderCancel(data) {
	return request({
		url: '/customer/orders/cancel',
		method: 'POST',
		data
	})
}

//代理每月账单列表
export function customerOrderList(data) {
	return request({
		url: '/customer/user/agent/separate/list',
		method: 'POST',
		data
	})
}
//每月详细列表：

export function customerOrderListInfo(data) {
	return request({
		url: '/customer/user/agent/separate/list/month',
		method: 'POST',
		data
	})
}
//每月详细列表：

export function customerOrderListConfirm(data) {
	return request({
		url: '/customer/user/agent/separate/confirm',
		method: 'POST',
		data
	})
}